package com.lyy.system.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lyy.system.entity.Role;
import org.apache.ibatis.annotations.Param;

public interface RoleMapper extends BaseMapper<Role> {

    //条件分页数据查询
    IPage<Role> findRolePage(Page<Role> page, @Param(Constants.WRAPPER) QueryWrapper<Role> wrapper);

    //根据用户id查询角色
    Role getRoleByUserId( @Param(Constants.WRAPPER) QueryWrapper<Role> wrapper);
}
